<?php

namespace app\controllers;

use Yii;
use yii\web\Controller;
use yii\web\Request;
use yii\web\Response;
use proxy\HttpProxy;
use helper\SessionHelper;

class IndexController extends SecBaseController
{
    public function actionIndex()
    {
          $menus = $this->session->get("menus");
          $url = '/nopermission';
          if (count($menus) != 0 &&  
              count($menus[0]["items"]) != 0 &&  
              count($menus[0]["items"][0]["url"]) != 0) {
              $url = $menus[0]["items"][0]["url"][0];
          }   
          return $this->myRedirect($url);
    }
    
}
